package org.csu.mall.service;

import org.csu.mall.common.UniformResponse;
import org.csu.mall.entity.Account;
import org.csu.mall.vo.AccountListVO;
import org.csu.mall.vo.AccountVO;

import java.util.List;

public interface IAccountService {

    UniformResponse<Account> login(String username, String password);

    UniformResponse<String> register(Account account);

    UniformResponse<String> checkField(String type, String value);

    UniformResponse<String> forgetPassword(String type, String value);

    UniformResponse<String> checkAnswer(String username, String question, String answer);

    UniformResponse<String> forgetReset(String username, String forgetToken, String newPassword);

    UniformResponse<String> resetPassword(Account account, String oldPassword, String newPassword, String answer);

    UniformResponse<Account> modifyAccountInfo(Account account, Account oldAccount);

    UniformResponse<AccountVO> getAccount(Account account);

    UniformResponse<String> authentication(Account account, String realName, Long idCard, String answer);

    UniformResponse<Account> rechargeAccount(Account account, Double balance);

    UniformResponse<Account> addAddress(Account account, String address);

    UniformResponse<String> logout(Account account);

    UniformResponse<AccountListVO> getAccountList(Integer role, String username, int pageSize, int pageNum);

    UniformResponse<Account> updateAccountImage(String imgAddress, Account account);
}
